package scauCmiScaffolding.compiled;

import org.eclipse.jet.JET2Context;
import org.eclipse.jet.JET2Template;
import org.eclipse.jet.JET2Writer;
import org.eclipse.jet.taglib.RuntimeTagElement;
import org.eclipse.jet.taglib.TagInfo;

public class _jet_findEntityByPhysicalPrimaryKey_2 implements JET2Template {
    private static final String _jetns_c = "org.eclipse.jet.controlTags"; //$NON-NLS-1$
    private static final String _jetns_java = "org.eclipse.jet.javaTags"; //$NON-NLS-1$

    public _jet_findEntityByPhysicalPrimaryKey_2() {
        super();
    }

    private static final String NL = System.getProperty("line.separator"); //$NON-NLS-1$
    
    private static final TagInfo _td_java_format_1_1 = new TagInfo("java:format", //$NON-NLS-1$
            1, 1,
            new String[] {
            },
            new String[] {
            } );
    private static final TagInfo _td_c_setVariable_4_1 = new TagInfo("c:setVariable", //$NON-NLS-1$
            4, 1,
            new String[] {
                "select", //$NON-NLS-1$
                "var", //$NON-NLS-1$
            },
            new String[] {
                "$phycolCount", //$NON-NLS-1$
                "countPhysicalPriKeys", //$NON-NLS-1$
            } );
    private static final TagInfo _td_c_get_6_9 = new TagInfo("c:get", //$NON-NLS-1$
            6, 9,
            new String[] {
                "select", //$NON-NLS-1$
            },
            new String[] {
                "uppercaseFirst($eachTable/@name)", //$NON-NLS-1$
            } );
    private static final TagInfo _td_c_get_6_64 = new TagInfo("c:get", //$NON-NLS-1$
            6, 64,
            new String[] {
                "select", //$NON-NLS-1$
            },
            new String[] {
                "uppercaseFirst($eachTable/@name)", //$NON-NLS-1$
            } );
    private static final TagInfo _td_c_iterate_6_135 = new TagInfo("c:iterate", //$NON-NLS-1$
            6, 135,
            new String[] {
                "select", //$NON-NLS-1$
                "var", //$NON-NLS-1$
            },
            new String[] {
                "$eachTable/physicalPrimaryKeys/column", //$NON-NLS-1$
                "physicalKey", //$NON-NLS-1$
            } );
    private static final TagInfo _td_c_choose_6_211 = new TagInfo("c:choose", //$NON-NLS-1$
            6, 211,
            new String[] {
            },
            new String[] {
            } );
    private static final TagInfo _td_c_when_6_221 = new TagInfo("c:when", //$NON-NLS-1$
            6, 221,
            new String[] {
                "test", //$NON-NLS-1$
            },
            new String[] {
                "$physicalKey/@order=$phycolCount", //$NON-NLS-1$
            } );
    private static final TagInfo _td_c_get_6_269 = new TagInfo("c:get", //$NON-NLS-1$
            6, 269,
            new String[] {
                "select", //$NON-NLS-1$
            },
            new String[] {
                "($physicalKey/@javaType)", //$NON-NLS-1$
            } );
    private static final TagInfo _td_c_get_6_312 = new TagInfo("c:get", //$NON-NLS-1$
            6, 312,
            new String[] {
                "select", //$NON-NLS-1$
            },
            new String[] {
                "lowercaseFirst($physicalKey/@fieldUpper)", //$NON-NLS-1$
            } );
    private static final TagInfo _td_c_otherwise_6_380 = new TagInfo("c:otherwise", //$NON-NLS-1$
            6, 380,
            new String[] {
            },
            new String[] {
            } );
    private static final TagInfo _td_c_get_6_393 = new TagInfo("c:get", //$NON-NLS-1$
            6, 393,
            new String[] {
                "select", //$NON-NLS-1$
            },
            new String[] {
                "($physicalKey/@javaType)", //$NON-NLS-1$
            } );
    private static final TagInfo _td_c_get_6_436 = new TagInfo("c:get", //$NON-NLS-1$
            6, 436,
            new String[] {
                "select", //$NON-NLS-1$
            },
            new String[] {
                "lowercaseFirst($physicalKey/@fieldUpper)", //$NON-NLS-1$
            } );
    private static final TagInfo _td_java_import_6_542 = new TagInfo("java:import", //$NON-NLS-1$
            6, 542,
            new String[] {
            },
            new String[] {
            } );
    private static final TagInfo _td_c_get_8_9 = new TagInfo("c:get", //$NON-NLS-1$
            8, 9,
            new String[] {
                "select", //$NON-NLS-1$
            },
            new String[] {
                "uppercaseFirst($eachTable/@name)", //$NON-NLS-1$
            } );
    private static final TagInfo _td_c_get_8_64 = new TagInfo("c:get", //$NON-NLS-1$
            8, 64,
            new String[] {
                "select", //$NON-NLS-1$
            },
            new String[] {
                "uppercaseFirst($eachTable/@name)", //$NON-NLS-1$
            } );
    private static final TagInfo _td_c_iterate_8_135 = new TagInfo("c:iterate", //$NON-NLS-1$
            8, 135,
            new String[] {
                "select", //$NON-NLS-1$
                "var", //$NON-NLS-1$
            },
            new String[] {
                "$eachTable/physicalPrimaryKeys/column", //$NON-NLS-1$
                "physicalKey", //$NON-NLS-1$
            } );
    private static final TagInfo _td_c_get_8_211 = new TagInfo("c:get", //$NON-NLS-1$
            8, 211,
            new String[] {
                "select", //$NON-NLS-1$
            },
            new String[] {
                "($physicalKey/@javaType)", //$NON-NLS-1$
            } );
    private static final TagInfo _td_c_get_8_254 = new TagInfo("c:get", //$NON-NLS-1$
            8, 254,
            new String[] {
                "select", //$NON-NLS-1$
            },
            new String[] {
                "lowercaseFirst($physicalKey/@fieldUpper)", //$NON-NLS-1$
            } );
    private static final TagInfo _td_java_import_8_364 = new TagInfo("java:import", //$NON-NLS-1$
            8, 364,
            new String[] {
            },
            new String[] {
            } );

    public void generate(final JET2Context context, final JET2Writer __out) {
        JET2Writer out = __out;
        RuntimeTagElement _jettag_java_format_1_1 = context.getTagFactory().createRuntimeTag(_jetns_java, "format", "java:format", _td_java_format_1_1); //$NON-NLS-1$ //$NON-NLS-2$
        _jettag_java_format_1_1.setRuntimeParent(null);
        _jettag_java_format_1_1.setTagInfo(_td_java_format_1_1);
        _jettag_java_format_1_1.doStart(context, out);
        JET2Writer _jettag_java_format_1_1_saved_out = out;
        while (_jettag_java_format_1_1.okToProcessBody()) {
            out = out.newNestedContentWriter();
            out.write(NL);         
            //此处已经不能再简化，因为无法将判断逻辑封装到java代码中处理20191220
            //此处判断逻辑已经进一步简化了，足够简单20200208唐锦文
            RuntimeTagElement _jettag_c_setVariable_4_1 = context.getTagFactory().createRuntimeTag(_jetns_c, "setVariable", "c:setVariable", _td_c_setVariable_4_1); //$NON-NLS-1$ //$NON-NLS-2$
            _jettag_c_setVariable_4_1.setRuntimeParent(_jettag_java_format_1_1);
            _jettag_c_setVariable_4_1.setTagInfo(_td_c_setVariable_4_1);
            _jettag_c_setVariable_4_1.doStart(context, out);
            _jettag_c_setVariable_4_1.doEnd();
            out.write(NL);         
            out.write("\tpublic ");  //$NON-NLS-1$        
            RuntimeTagElement _jettag_c_get_6_9 = context.getTagFactory().createRuntimeTag(_jetns_c, "get", "c:get", _td_c_get_6_9); //$NON-NLS-1$ //$NON-NLS-2$
            _jettag_c_get_6_9.setRuntimeParent(_jettag_java_format_1_1);
            _jettag_c_get_6_9.setTagInfo(_td_c_get_6_9);
            _jettag_c_get_6_9.doStart(context, out);
            _jettag_c_get_6_9.doEnd();
            out.write(" find");  //$NON-NLS-1$        
            RuntimeTagElement _jettag_c_get_6_64 = context.getTagFactory().createRuntimeTag(_jetns_c, "get", "c:get", _td_c_get_6_64); //$NON-NLS-1$ //$NON-NLS-2$
            _jettag_c_get_6_64.setRuntimeParent(_jettag_java_format_1_1);
            _jettag_c_get_6_64.setTagInfo(_td_c_get_6_64);
            _jettag_c_get_6_64.doStart(context, out);
            _jettag_c_get_6_64.doEnd();
            out.write("ByPhysicalPrimaryKey(");  //$NON-NLS-1$        
            RuntimeTagElement _jettag_c_iterate_6_135 = context.getTagFactory().createRuntimeTag(_jetns_c, "iterate", "c:iterate", _td_c_iterate_6_135); //$NON-NLS-1$ //$NON-NLS-2$
            _jettag_c_iterate_6_135.setRuntimeParent(_jettag_java_format_1_1);
            _jettag_c_iterate_6_135.setTagInfo(_td_c_iterate_6_135);
            _jettag_c_iterate_6_135.doStart(context, out);
            while (_jettag_c_iterate_6_135.okToProcessBody()) {
                RuntimeTagElement _jettag_c_choose_6_211 = context.getTagFactory().createRuntimeTag(_jetns_c, "choose", "c:choose", _td_c_choose_6_211); //$NON-NLS-1$ //$NON-NLS-2$
                _jettag_c_choose_6_211.setRuntimeParent(_jettag_c_iterate_6_135);
                _jettag_c_choose_6_211.setTagInfo(_td_c_choose_6_211);
                _jettag_c_choose_6_211.doStart(context, out);
                JET2Writer _jettag_c_choose_6_211_saved_out = out;
                while (_jettag_c_choose_6_211.okToProcessBody()) {
                    out = out.newNestedContentWriter();
                    RuntimeTagElement _jettag_c_when_6_221 = context.getTagFactory().createRuntimeTag(_jetns_c, "when", "c:when", _td_c_when_6_221); //$NON-NLS-1$ //$NON-NLS-2$
                    _jettag_c_when_6_221.setRuntimeParent(_jettag_c_choose_6_211);
                    _jettag_c_when_6_221.setTagInfo(_td_c_when_6_221);
                    _jettag_c_when_6_221.doStart(context, out);
                    JET2Writer _jettag_c_when_6_221_saved_out = out;
                    while (_jettag_c_when_6_221.okToProcessBody()) {
                        out = out.newNestedContentWriter();
                        RuntimeTagElement _jettag_c_get_6_269 = context.getTagFactory().createRuntimeTag(_jetns_c, "get", "c:get", _td_c_get_6_269); //$NON-NLS-1$ //$NON-NLS-2$
                        _jettag_c_get_6_269.setRuntimeParent(_jettag_c_when_6_221);
                        _jettag_c_get_6_269.setTagInfo(_td_c_get_6_269);
                        _jettag_c_get_6_269.doStart(context, out);
                        _jettag_c_get_6_269.doEnd();
                        out.write(" ");  //$NON-NLS-1$        
                        RuntimeTagElement _jettag_c_get_6_312 = context.getTagFactory().createRuntimeTag(_jetns_c, "get", "c:get", _td_c_get_6_312); //$NON-NLS-1$ //$NON-NLS-2$
                        _jettag_c_get_6_312.setRuntimeParent(_jettag_c_when_6_221);
                        _jettag_c_get_6_312.setTagInfo(_td_c_get_6_312);
                        _jettag_c_get_6_312.doStart(context, out);
                        _jettag_c_get_6_312.doEnd();
                        out.write(" ");  //$NON-NLS-1$        
                        _jettag_c_when_6_221.handleBodyContent(out);
                    }
                    out = _jettag_c_when_6_221_saved_out;
                    _jettag_c_when_6_221.doEnd();
                    RuntimeTagElement _jettag_c_otherwise_6_380 = context.getTagFactory().createRuntimeTag(_jetns_c, "otherwise", "c:otherwise", _td_c_otherwise_6_380); //$NON-NLS-1$ //$NON-NLS-2$
                    _jettag_c_otherwise_6_380.setRuntimeParent(_jettag_c_choose_6_211);
                    _jettag_c_otherwise_6_380.setTagInfo(_td_c_otherwise_6_380);
                    _jettag_c_otherwise_6_380.doStart(context, out);
                    JET2Writer _jettag_c_otherwise_6_380_saved_out = out;
                    while (_jettag_c_otherwise_6_380.okToProcessBody()) {
                        out = out.newNestedContentWriter();
                        RuntimeTagElement _jettag_c_get_6_393 = context.getTagFactory().createRuntimeTag(_jetns_c, "get", "c:get", _td_c_get_6_393); //$NON-NLS-1$ //$NON-NLS-2$
                        _jettag_c_get_6_393.setRuntimeParent(_jettag_c_otherwise_6_380);
                        _jettag_c_get_6_393.setTagInfo(_td_c_get_6_393);
                        _jettag_c_get_6_393.doStart(context, out);
                        _jettag_c_get_6_393.doEnd();
                        out.write(" ");  //$NON-NLS-1$        
                        RuntimeTagElement _jettag_c_get_6_436 = context.getTagFactory().createRuntimeTag(_jetns_c, "get", "c:get", _td_c_get_6_436); //$NON-NLS-1$ //$NON-NLS-2$
                        _jettag_c_get_6_436.setRuntimeParent(_jettag_c_otherwise_6_380);
                        _jettag_c_get_6_436.setTagInfo(_td_c_get_6_436);
                        _jettag_c_get_6_436.doStart(context, out);
                        _jettag_c_get_6_436.doEnd();
                        out.write(", ");  //$NON-NLS-1$        
                        _jettag_c_otherwise_6_380.handleBodyContent(out);
                    }
                    out = _jettag_c_otherwise_6_380_saved_out;
                    _jettag_c_otherwise_6_380.doEnd();
                    _jettag_c_choose_6_211.handleBodyContent(out);
                }
                out = _jettag_c_choose_6_211_saved_out;
                _jettag_c_choose_6_211.doEnd();
                _jettag_c_iterate_6_135.handleBodyContent(out);
            }
            _jettag_c_iterate_6_135.doEnd();
            out.write(") throws ");  //$NON-NLS-1$        
            RuntimeTagElement _jettag_java_import_6_542 = context.getTagFactory().createRuntimeTag(_jetns_java, "import", "java:import", _td_java_import_6_542); //$NON-NLS-1$ //$NON-NLS-2$
            _jettag_java_import_6_542.setRuntimeParent(_jettag_java_format_1_1);
            _jettag_java_import_6_542.setTagInfo(_td_java_import_6_542);
            _jettag_java_import_6_542.doStart(context, out);
            JET2Writer _jettag_java_import_6_542_saved_out = out;
            while (_jettag_java_import_6_542.okToProcessBody()) {
                out = out.newNestedContentWriter();
                out.write("org.springframework.dao.DataAccessException");  //$NON-NLS-1$        
                _jettag_java_import_6_542.handleBodyContent(out);
            }
            out = _jettag_java_import_6_542_saved_out;
            _jettag_java_import_6_542.doEnd();
            out.write(";");  //$NON-NLS-1$        
            out.write(NL);         
            out.write(NL);         
            out.write("\tpublic ");  //$NON-NLS-1$        
            RuntimeTagElement _jettag_c_get_8_9 = context.getTagFactory().createRuntimeTag(_jetns_c, "get", "c:get", _td_c_get_8_9); //$NON-NLS-1$ //$NON-NLS-2$
            _jettag_c_get_8_9.setRuntimeParent(_jettag_java_format_1_1);
            _jettag_c_get_8_9.setTagInfo(_td_c_get_8_9);
            _jettag_c_get_8_9.doStart(context, out);
            _jettag_c_get_8_9.doEnd();
            out.write(" find");  //$NON-NLS-1$        
            RuntimeTagElement _jettag_c_get_8_64 = context.getTagFactory().createRuntimeTag(_jetns_c, "get", "c:get", _td_c_get_8_64); //$NON-NLS-1$ //$NON-NLS-2$
            _jettag_c_get_8_64.setRuntimeParent(_jettag_java_format_1_1);
            _jettag_c_get_8_64.setTagInfo(_td_c_get_8_64);
            _jettag_c_get_8_64.doStart(context, out);
            _jettag_c_get_8_64.doEnd();
            out.write("ByPhysicalPrimaryKey(");  //$NON-NLS-1$        
            RuntimeTagElement _jettag_c_iterate_8_135 = context.getTagFactory().createRuntimeTag(_jetns_c, "iterate", "c:iterate", _td_c_iterate_8_135); //$NON-NLS-1$ //$NON-NLS-2$
            _jettag_c_iterate_8_135.setRuntimeParent(_jettag_java_format_1_1);
            _jettag_c_iterate_8_135.setTagInfo(_td_c_iterate_8_135);
            _jettag_c_iterate_8_135.doStart(context, out);
            while (_jettag_c_iterate_8_135.okToProcessBody()) {
                RuntimeTagElement _jettag_c_get_8_211 = context.getTagFactory().createRuntimeTag(_jetns_c, "get", "c:get", _td_c_get_8_211); //$NON-NLS-1$ //$NON-NLS-2$
                _jettag_c_get_8_211.setRuntimeParent(_jettag_c_iterate_8_135);
                _jettag_c_get_8_211.setTagInfo(_td_c_get_8_211);
                _jettag_c_get_8_211.doStart(context, out);
                _jettag_c_get_8_211.doEnd();
                out.write(" ");  //$NON-NLS-1$        
                RuntimeTagElement _jettag_c_get_8_254 = context.getTagFactory().createRuntimeTag(_jetns_c, "get", "c:get", _td_c_get_8_254); //$NON-NLS-1$ //$NON-NLS-2$
                _jettag_c_get_8_254.setRuntimeParent(_jettag_c_iterate_8_135);
                _jettag_c_get_8_254.setTagInfo(_td_c_get_8_254);
                _jettag_c_get_8_254.doStart(context, out);
                _jettag_c_get_8_254.doEnd();
                out.write(", ");  //$NON-NLS-1$        
                _jettag_c_iterate_8_135.handleBodyContent(out);
            }
            _jettag_c_iterate_8_135.doEnd();
            out.write(" int startResult, int maxRows) throws ");  //$NON-NLS-1$        
            RuntimeTagElement _jettag_java_import_8_364 = context.getTagFactory().createRuntimeTag(_jetns_java, "import", "java:import", _td_java_import_8_364); //$NON-NLS-1$ //$NON-NLS-2$
            _jettag_java_import_8_364.setRuntimeParent(_jettag_java_format_1_1);
            _jettag_java_import_8_364.setTagInfo(_td_java_import_8_364);
            _jettag_java_import_8_364.doStart(context, out);
            JET2Writer _jettag_java_import_8_364_saved_out = out;
            while (_jettag_java_import_8_364.okToProcessBody()) {
                out = out.newNestedContentWriter();
                out.write("org.springframework.dao.DataAccessException");  //$NON-NLS-1$        
                _jettag_java_import_8_364.handleBodyContent(out);
            }
            out = _jettag_java_import_8_364_saved_out;
            _jettag_java_import_8_364.doEnd();
            out.write(";");  //$NON-NLS-1$        
            out.write(NL);         
            _jettag_java_format_1_1.handleBodyContent(out);
        }
        out = _jettag_java_format_1_1_saved_out;
        _jettag_java_format_1_1.doEnd();
    }
}
